package net.stogi.unicore.beyond.ui.client.taskeditor.taskoutline;

import net.stogi.unicore.beyond.api.model.InputDefinition;
import net.stogi.unicore.beyond.api.model.InputGroup;

import com.google.gwt.event.shared.GwtEvent;

public class InputDefinitionMovedEvent extends GwtEvent<InputDefinitionMovedHandler> {

	public static final GwtEvent.Type<InputDefinitionMovedHandler> TYPE = new GwtEvent.Type<InputDefinitionMovedHandler>();

	private InputDefinition inputDefinition;
	
	private InputGroup inputGroup;
	
	public InputDefinitionMovedEvent(InputDefinition inputDefinition, InputGroup inputGroup) {
		this.inputDefinition = inputDefinition;
		this.inputGroup = inputGroup;
	}

	@SuppressWarnings("unused")
	private InputDefinitionMovedEvent() {}

	@Override
	public Type<InputDefinitionMovedHandler> getAssociatedType() {
		return TYPE;
	}

	public InputDefinition getInputDefinition() {
		return inputDefinition;
	}

	public InputGroup getInputGroup() {
		return inputGroup;
	}

	public void setInputDefinition(InputDefinition inputDefinition) {
		this.inputDefinition = inputDefinition;
	}

	public void setInputGroup(InputGroup inputGroup) {
		this.inputGroup = inputGroup;
	}

	@Override
	protected void dispatch(InputDefinitionMovedHandler handler) {
		handler.onInputDefinitionMoved(this);
	}
}
